package cn.iocoder.yudao.module.of.dal.mysql.meetingpart;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.of.dal.dataobject.meetingpart.MeetingPartDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.of.controller.admin.meetingpart.vo.*;

/**
 * 会议参与者 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface MeetingPartMapper extends BaseMapperX<MeetingPartDO> {

    default PageResult<MeetingPartDO> selectPage(MeetingPartPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MeetingPartDO>()
                .eqIfPresent(MeetingPartDO::getMeetingId, reqVO.getMeetingId())
                .eqIfPresent(MeetingPartDO::getUserId, reqVO.getUserId())
                .eqIfPresent(MeetingPartDO::getDeptId, reqVO.getDeptId())
                .betweenIfPresent(MeetingPartDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MeetingPartDO::getId));
    }

}